home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / unarced / graphics / anim / readpict.h < prev    next >
C/C++ Source or Header  |  1995-03-17  |  2KB  |  66 lines

  1. #ifndef READPICT_H
  2. #define READPICT_H
  3. #ifndef ILBM_H
  4. #include <ilbm.h>
  5. #endif
  6.  
  7. #ifndef GRAPHICS_GFX_H
  8. #include <graphics/gfx.h>
  9. #endif
  10.  
  11.  
  12. #define maxCycles   8
  13. #define RNG_NORATE  36   /* Dpaint uses this rate to mean non-active */
  14.  
  15. typedef struct {
  16.    WORD  pad1;   /* future exp - store 0 here */
  17.    WORD  rate;   /* 60/sec=16384, 30/sec=8192, 1/sec=16384/60=273 */
  18.    WORD  active; /* lo bit 0=no cycle, 1=yes; next bit 1=rvs */
  19.    UBYTE low;    /* range lower */
  20.    UBYTE high;   /* range upper */
  21.    } CrngChunk;
  22.  
  23. typedef struct {
  24.    WORD  direction;  /* 0=don't cycle, 1=forward, -1=backwards */
  25.    UBYTE start;      /* range lower */
  26.    UBYTE end;        /* range upper */
  27.    LONG  seconds;    /* seconds between cycling */
  28.    LONG  microseconds; /* msecs between cycling */
  29.    WORD  pad;        /* future exp - store 0 here */
  30.    } CcrtChunk;
  31.  
  32.  
  33. #define GetCAMG(context, camg)  \
  34.     IFFReadBytes(context, (BYTE *)camg, sizeof(CamgChunk))
  35.  
  36. #define ID_CRNG  MakeID('C','R','N','G')
  37. #define GetCRNG(context, crng)  \
  38.     IFFReadBytes(context, (BYTE *)crng, sizeof(CrngChunk))
  39.  
  40. #define ID_CCRT  MakeID('C','C','R','T')
  41. #define GetCCRT(context, ccrt)  \
  42.     IFFReadBytes(context, (BYTE *)ccrt, sizeof(CcrtChunk))
  43.  
  44. typedef struct {
  45. ClientFrame clientFrame;
  46. UBYTE foundBMHD;
  47. UBYTE nColorRegs;
  48. BitMapHeader bmHdr;
  49. Color4 colorMap[32 ];
  50.    /* If you want to read any other property chunks, e.g. GRAB or CAMG, add
  51.     * fields to this record to store them. */
  52.    UBYTE foundCAMG;
  53.    CamgChunk camgChunk;
  54.    UBYTE cycleCnt;
  55.    CrngChunk crngChunks[maxCycles]; /* I'll convert CCRT to this */
  56. } ILBMFrame;
  57. typedef UBYTE *UBytePtr;
  58. #ifdef FDwAT
  59. typedef UBytePtr Allocator(LONG);
  60. extern IFFP ReadPicture(LONG, struct BitMap *, ILBMFrame *, Allocator *);
  61. #else
  62. typedef UBytePtr Allocator();
  63. extern IFFP ReadPicture();
  64. #endif
  65. #endif READPICT_H
  66.